package upnp

import (
	"io"
	"io/ioutil"
	"net"
)

// Client upnp client
type Client struct {
}

func (c *Client) sendFrom(conn *net.UDPConn, addr *net.UDPAddr, r io.Reader) error {
	data, err := ioutil.ReadAll(r)
	if err != nil {
		return err
	}
	_, err = conn.WriteTo(data, addr)
	return err
}
